package com.atguigu.gmall.client.service;

import com.atguigu.gmall.result.RetVal;
import com.atguigu.gmall.search.Product;
import com.atguigu.gmall.search.SearchParam;
import com.atguigu.gmall.search.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("shop-search")
public interface SearchFeignClientService {

    /*rabbitmq 消息发送来实现*/
    /*
    //上架商品
    @GetMapping("/search/onSale/{skuId}")
    public RetVal onSale(@PathVariable Long skuId);

    //下架商品
    @GetMapping("/search/offSale/{skuId}")
    public RetVal offSale(@PathVariable Long skuId);*/

    @GetMapping("/search/incrHotScore/{skuId}")
    public RetVal incrHotScore(@PathVariable Long skuId);

    //获取搜索数据
    @PostMapping("/search/findProductBySearchParam")
    public RetVal findProductByKeyWord(@RequestBody SearchParam searchParam);
}
